<template>
  <div class="bbn_page">
    <TitleBar></TitleBar>
    <div>测试页面</div>
    <el-card>
      <div class="p20">
        <el-input v-model="state.path" placeholder=""></el-input>
        <el-button type="primary" @click="test">测试</el-button>
        <el-button type="primary" @click="closeWin">关闭</el-button>
      </div>
    </el-card>
  </div>
</template>
<script setup lang="ts">
import TitleBar from "@renderer/components/common/TitleBar.vue";
import { reactive } from "vue";
let { ipcRenderer, shell, crash } = window;
let state = reactive({
  path: "D:\\yckj\\work",
});
const closeWin = () => {};
const test = async () => {
  // ipcRenderer.invoke("readDir", data).then((res) => {
  //   console.log("#debug#🚀 ~ test ~ res:", res);
  // });

  let res = await ipcRenderer.invoke("readDir", state.path);
  console.log("#debug#🚀 ~ test ~ res:", res);
};
</script>
<style scoped lang="scss">
.p20 {
  padding: 20px;
}
</style>
